package com.kunchi.wms.stock.dao;

import com.kunchi.wms.stock.po.Stock;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface StockMapper {
    @Select("select * from `stock`")
    List<Stock> findAll();

    @Insert({ "INSERT INTO `stock` (`id`, `sto_name`, `sto_number`, `sto_status`) VALUES (#{id}, #{stoName}, #{stoNumber}, #{stoStatus})" })
    void add(Stock order);

    @Update({"UPDATE `order` SET `sto_name`=#{stoName}, sto_number=#{stoName},sto_status=#{stoStatus} WHERE (`id`=#{id})"})
    void update(Stock order);


}
